# -*- coding: utf-8 -*-

from odoo import models, fields, api, modules, _
from odoo.exceptions import UserError

class City(models.Model):
    _name = 'mxbase.city'

    name = fields.Char(required=True, string=u'名称')
    code = fields.Char(required=True, string=u'编码')
    weather_city_id=fields.Char(u'墨迹天气城市ID')
    weather_cn_id=fields.Char(u'天气城市ID')

    # is_capital = fields.Boolean(default=False, string=u'省会城市')

    province_id = fields.Many2one('mxbase.province', string=u'省/自治区/直辖市')

    county_ids = fields.One2many('mxbase.county', 'city_id', string=u'区/县')




